{ "duration": "[Repeat Item as AVAsset’s Duration]" }
let dict = [3 Dictionary]
const parts = dict.duration.split(":").map(Number)
let totalSeconds = 0
if (parts.length === 3) {
// HH:MM:SS format
const hours = parts[0]
const minutes = parts[1]
const seconds = parts[2]
totalSeconds = hours * 3600 + minutes * 60 + seconds
} else if (parts.length === 2) {
// MM:SS format
const minutes = parts[0]
const seconds = parts[1]
totalSeconds = minutes * 60 + seconds
}
document.write(totalSeconds)
Workflow
: { "workflowIdentifier": "E2CEB2A0-A1D2-4040-B3D2-804B9C84CAE8",
"workflowName": "Run JavaScript Code",
"isSelf": false
}